home *** CD-ROM | disk | FTP | other *** search
/ Erotic Games: Memory / Erotic Games: Memory.iso / mac / air_installers / AdobeAIR.exe / setup.swf / scripts / mx / core / ContainerGlobals.as < prev    next >
Text File  |  2009-02-12  |  2KB  |  74 lines

  1. package mx.core
  2. {
  3.    import flash.display.InteractiveObject;
  4.    import mx.managers.IFocusManager;
  5.    
  6.    public class ContainerGlobals
  7.    {
  8.       
  9.       public static var focusedContainer:InteractiveObject;
  10.        
  11.       
  12.       public function ContainerGlobals()
  13.       {
  14.          super();
  15.       }
  16.       
  17.       public static function checkFocus(param1:InteractiveObject, param2:InteractiveObject) : void
  18.       {
  19.          var _loc6_:IFocusManager = null;
  20.          var _loc7_:IButton = null;
  21.          var _loc3_:InteractiveObject = param2;
  22.          var _loc4_:InteractiveObject = param2;
  23.          var _loc5_:IUIComponent = null;
  24.          if(param2 != null && param1 == param2)
  25.          {
  26.             return;
  27.          }
  28.          while(_loc4_)
  29.          {
  30.             if(_loc4_.parent)
  31.             {
  32.                _loc3_ = _loc4_.parent;
  33.             }
  34.             else
  35.             {
  36.                _loc3_ = null;
  37.             }
  38.             if(_loc4_ is IUIComponent)
  39.             {
  40.                _loc5_ = IUIComponent(_loc4_);
  41.             }
  42.             if((_loc4_ = _loc3_) && _loc4_ is IContainer && IContainer(_loc4_).defaultButton)
  43.             {
  44.                break;
  45.             }
  46.          }
  47.          if(ContainerGlobals.focusedContainer != _loc4_ || ContainerGlobals.focusedContainer == null && _loc4_ == null)
  48.          {
  49.             if(!_loc4_)
  50.             {
  51.                _loc4_ = InteractiveObject(_loc5_);
  52.             }
  53.             if(_loc4_ && _loc4_ is IContainer)
  54.             {
  55.                if(!(_loc6_ = IContainer(_loc4_).focusManager))
  56.                {
  57.                   return;
  58.                }
  59.                if(_loc7_ = IContainer(_loc4_).defaultButton as IButton)
  60.                {
  61.                   ContainerGlobals.focusedContainer = InteractiveObject(_loc4_);
  62.                   _loc6_.defaultButton = _loc7_ as IButton;
  63.                }
  64.                else
  65.                {
  66.                   ContainerGlobals.focusedContainer = InteractiveObject(_loc4_);
  67.                   _loc6_.defaultButton = null;
  68.                }
  69.             }
  70.          }
  71.       }
  72.    }
  73. }
  74.